package com.guisu.material.rv2

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import com.guisu.material.databinding.ActivityRvBinding

class RvActivity: AppCompatActivity() {

    private lateinit var binding: ActivityRvBinding
    private val rvAdapter by lazy { RvAdapter() }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityRvBinding.inflate(layoutInflater)
        setContentView(binding.root)

        binding.rv.layoutManager = LinearLayoutManager(this)
        binding.rv.adapter = rvAdapter
        rvAdapter.data = arrayListOf(
            "asdd1324565",
            "6446asdasdasd",
            "阿松大啊实打实的",
            "asdd1324565",
            "6446asdasdasd"
        )
    }

}